// import cn from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
// import s from './style.module.css';

function StatusIcon({ className, status }) {
	switch (status) {
		case 'waiting':
			return (
				<svg
					className={className}
					width="16"
					height="16"
					viewBox="0 0 16 16"
					fill="none"
					xmlns="http://www.w3.org/2000/svg"
				>
					<path
						fillRule="evenodd"
						clipRule="evenodd"
						d="M0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8ZM8 8.5H12C12.3 8.5 12.5 8.3 12.5 8C12.5 7.7 12.3 7.5 12 7.5H8.5V4C8.5 3.7 8.3 3.5 8 3.5C7.7 3.5 7.5 3.7 7.5 4V8C7.5 8.3 7.7 8.5 8 8.5Z"
						fill="#0AB272"
					/>
				</svg>
			);
		case 'active':
			return (
				<svg
					className={className}
					width="16"
					height="16"
					viewBox="0 0 16 16"
					fill="none"
					xmlns="http://www.w3.org/2000/svg"
				>
					<path
						fillRule="evenodd"
						clipRule="evenodd"
						d="M7.32856 0.680003C7.32856 0.304969 7.63194 0.000737974 8.00666 2.60854e-06C8.18709 -0.00035147 8.36025 0.0711348 8.48796 0.198698C8.61566 0.326261 8.68743 0.499424 8.68743 0.680003V3.89867C8.68743 4.14161 8.55793 4.3661 8.34771 4.48757C8.13749 4.60904 7.87849 4.60904 7.66828 4.48757C7.45806 4.3661 7.32856 4.14161 7.32856 3.89867V0.680003ZM3.89409 7.344C4.26933 7.344 4.57352 7.64845 4.57352 8.024H4.57485C4.57485 8.39956 4.27066 8.704 3.89542 8.704H0.679434C0.304193 8.704 0 8.39956 0 8.024C0 7.64845 0.304193 7.344 0.679434 7.344H3.89409ZM12.1046 7.344H15.3206C15.6958 7.344 16 7.64845 16 8.024C16 8.39956 15.6958 8.704 15.3206 8.704H12.1046C11.8618 8.704 11.6375 8.57439 11.5162 8.364C11.3948 8.15361 11.3948 7.89439 11.5162 7.684C11.6375 7.47361 11.8618 7.344 12.1046 7.344ZM8.00666 11.6507C7.63246 11.6514 7.32929 11.9548 7.32856 12.3293V15.32C7.32856 15.5629 7.45806 15.7874 7.66828 15.9089C7.87849 16.0304 8.13749 16.0304 8.34771 15.9089C8.55793 15.7874 8.68743 15.5629 8.68743 15.32V12.3307C8.68743 11.9551 8.38323 11.6507 8.00799 11.6507H8.00666ZM4.60283 10.4133L2.32873 12.6907C2.08405 12.9593 2.09376 13.3731 2.35076 13.6299C2.60777 13.8868 3.02117 13.8959 3.28926 13.6507L5.56336 11.3733C5.7423 11.2029 5.81474 10.9488 5.75258 10.7095C5.69041 10.4703 5.50342 10.2837 5.26421 10.2221C5.025 10.1606 4.77126 10.2338 4.6015 10.4133H4.60283ZM11.3572 5.576C11.224 5.70933 11.0521 5.77467 10.8776 5.77467H10.8749C10.6001 5.77453 10.3524 5.60865 10.2474 5.35441C10.1424 5.10017 10.2008 4.80766 10.3953 4.61334L12.6734 2.33867C12.9419 2.09379 13.3553 2.10351 13.6119 2.36073C13.8686 2.61794 13.8777 3.03169 13.6326 3.3L11.3572 5.576ZM11.5357 10.572C11.2668 10.3328 10.8583 10.3449 10.6039 10.5995C10.3496 10.854 10.3376 11.2629 10.5765 11.532L12.6894 13.6507C12.8161 13.779 12.9888 13.8512 13.169 13.8512C13.3493 13.8512 13.522 13.779 13.6486 13.6507C13.9137 13.3851 13.9137 12.9549 13.6486 12.6893L11.5357 10.572ZM2.35882 2.38479C2.61318 2.13022 3.02171 2.11818 3.29059 2.35734V2.356L5.5647 4.63467C5.82892 4.90003 5.82892 5.3293 5.5647 5.59467C5.43805 5.723 5.26532 5.79523 5.0851 5.79523C4.90487 5.79523 4.73215 5.723 4.6055 5.59467L2.33139 3.31734C2.09243 3.04823 2.10446 2.63936 2.35882 2.38479Z"
						fill="#0AB272"
					/>
				</svg>
			);
		case 'stopped':
			return (
				<svg
					className={className}
					width="16"
					height="16"
					viewBox="0 0 16 16"
					fill="none"
					xmlns="http://www.w3.org/2000/svg"
					xlink="http://www.w3.org/1999/xlink"
				>
					<rect width="16" height="16" fill="url(#pattern0)" />
					<defs>
						<pattern
							id="pattern0"
							patternContentUnits="objectBoundingBox"
							width="1"
							height="1"
						>
							<use href="#image0" transform="scale(0.03125)" />
						</pattern>
						<image
							id="image0"
							width="32"
							height="32"
							href=""
						/>
					</defs>
				</svg>
			);
		case 'failed':
			return (
				<svg
					className={className}
					width="16"
					height="16"
					viewBox="0 0 16 16"
					fill="none"
					xmlns="http://www.w3.org/2000/svg"
				>
					<path
						fillRule="evenodd"
						clipRule="evenodd"
						d="M7.9516 0C10.086 0 12.1329 0.847874 13.642 2.35706L13.6408 2.35822C15.1509 3.86711 15.9996 5.9141 16 8.04872C16.0004 10.1833 15.1526 12.2307 13.6432 13.7402C10.4842 16.7912 5.46256 16.7474 2.35729 13.6418C-0.747978 10.5362 -0.790735 5.51507 2.2612 2.35706C3.7703 0.847874 5.81723 0 7.9516 0ZM11.4389 11.5338C11.703 11.2697 11.7117 10.8442 11.4585 10.5695L8.93385 8.04862L11.4562 5.52539C11.7095 5.25074 11.7009 4.82513 11.4367 4.56094C11.1725 4.29675 10.7469 4.28816 10.4722 4.54146L7.94869 7.06471L5.42867 4.54262C5.15399 4.28941 4.72841 4.29805 4.46423 4.56221C4.20005 4.82636 4.19142 5.2519 4.44466 5.52655L6.96817 8.04862L4.44466 10.5695C4.19151 10.8442 4.20019 11.2697 4.46433 11.5338C4.72847 11.7979 5.15398 11.8066 5.42867 11.5534L7.94869 9.03254L10.4745 11.5534C10.7492 11.8066 11.1747 11.7979 11.4389 11.5338Z"
						fill="#FF3F3B"
					/>
				</svg>
			);
		default:
			return null;
	}
}

StatusIcon.propTypes = {
	className: PropTypes.string,
	status: PropTypes.string.isRequired,
};
StatusIcon.defaultProps = {
	className: '',
};

export default StatusIcon;
